Overall Performance

sli_performance%>%
  select(-raw_comparison) %>%
  DT::datatable()
# to attach leaflet dependencies we do an invisible map
# otherwise procedural leaflets wont render
# https://stackoverflow.com/questions/63534247/recommended-way-to-initialize-js-renderer-in-asis-r-markdown-chunk
leaflet::leaflet(width = 0, height = 0)
for (i in 1:nrow(sli_performance)){
  
  cat (sprintf("\n\n# %s\n\n", sli_performance$method[[i]]))

  cat("\n\n## Absolute Performance\n\n")

  print(plot_sli_performance(sli_performance$raw_comparison[[i]], title = sprintf("%s: Absolute performance", sli_performance$method[[i]]), plot_type = "absolute"))
  
  cat("\n\n")
  
  map <- leaflet_sli_performance(sli_performance$raw_comparison[[i]], ons_shp, "diff_count") 
  
  cat(as.character(htmltools::tagList(map)))
  #widgetframe::frameWidget(map, width = "100%")
  
  cat("\n\n")
  
  cat("\n\n## Relative Performance\n\n")


  print(plot_sli_performance(sli_performance$raw_comparison[[i]], title = sprintf("%s: Relative performance", sli_performance$method[[i]]), plot_type = "proportional"))
  
  cat("\n\n")

map <- leaflet_sli_performance(sli_performance$raw_comparison[[i]], ons_shp, "diff_prop")

cat(as.character(htmltools::tagList(map)))
  
  }

SLI unoptimized

Absolute Performance

Relative Performance

SLI mean absolute error

Absolute Performance

Relative Performance

## Warning: Removed 1 rows containing missing values (geom_point).
## Warning in pal(plot_var): Some values were outside the color scale and will be
## treated as NA

SLI mean absolute percentage error

Absolute Performance

Relative Performance

SLI mean squared error

Absolute Performance

Relative Performance

3
## [1] 3